<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;

class UriController extends Controller
{
    public function reqtest(Request $request){
    	$uri = $request->path();
    	echo "uri=>",$uri;
    	echo "<br/>";

    	$pattern = $request->is('foo/*');
    	echo 'is Method=>',$pattern;
    	echo "<br/>";

    	$url = $request->url();
    	echo "url=>",$url;
    	echo "<br/>";
    }

    public function thisreq(Request $request){
    	$this->reqtest($request);
    }

    public function inputtest(Request $request){
    	$name = $request->input("name");

    	echo "name=>",$name;
    	echo "<br/>";

    	echo "passwd=>",$request->passwd;

    }


    /*展示视图*/
    public function reg(){
    	return view("reg");
    }

	/*展示post数据*/
    public function register(Request $request){
    	echo "name=>",$request->input("name");
    	echo "<br/>";

    	echo "passwd=>",$request->password;

    }

    // public function thisreq(){
    // 	$uri = Request::path();
    // 	echo "uri=>",$uri;
    // 	echo "<br/>";

    // 	$pattern = Request::is('foo/*');
    // 	echo 'is Method=>',$pattern;
    // 	echo "<br/>";

    // 	$url = Request::url();
    // 	echo "url=>",$url;
    // 	echo "<br/>";
    // }
}
